Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

The String Atom and the String Encoding Atom

Some of the leaf atoms within the VR world and node information atom containers contain fields that specify the ID of string atoms that are siblings of the leaf atom. For example, the VR world header atom contains a field for the name of the scene. The string atom is a leaf atom whose atom type is kQTVRStringAtomType ('vrsg'). Its atom ID is that specified by the referring leaf atom.

A string atom contains a string. The structure of a string atom is defined by the VRStringAtom data type:

typedef struct VRStringAtom {
    UInt16                              stringUsage;
    UInt16                              stringLength;
    unsigned char                       theString[4];
} VRStringAtom, *VRStringAtomPtr;
stringUsage
The string usage. Currently, this field is unused.
stringLength
The length, in bytes, of the string.
theString
The string. The string atom structure is extended to hold this string.

Each string atom may also have a sibling leaf atom called the string encoding atom. The string encoding atom's atom type is kQTVRStringEncodingAtomType ( 'vrse' ). Its atom ID is the same as that of the corresponding string atom. The string encoding atom contains a single variable, TextEncoding , a UInt32 , as defined in the header file TextCommon.h . The value of TextEncoding is handed, along with the string, to the routine QTTextToNativeText for conversion for display on the current machine. The routine QTTextToNativeText is found in the header file Movies.h.

The header file TextCommon.h contains constants and routines for generating and handling text encodings.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |